home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue31 / tablesrc / BIOLIFE.PAS next >
Encoding:
Pascal/Delphi Source File  |  1996-08-29  |  912 b   |  40 lines

  1. unit BIOLIFE;
  2. interface
  3.  
  4.   procedure CreateBIOLIFE;
  5.  
  6. implementation
  7. uses DB, DBTables;
  8.  
  9.   procedure CreateBIOLIFE;
  10.   begin
  11.     with TTable.Create(nil) do
  12.     try
  13.       Active := False;
  14.       TableType := ttParadox;
  15.       TableName := 'BIOLIFE.DB';
  16.       with FieldDefs do
  17.       begin
  18.         Clear;
  19.         Add('Species No', ftFloat, 0, FALSE);
  20.         Add('Category', ftString, 15, FALSE);
  21.         Add('Common_Name', ftString, 30, FALSE);
  22.         Add('Species Name', ftString, 40, FALSE);
  23.         Add('Length (cm)', ftFloat, 0, FALSE);
  24.         Add('Length_In', ftFloat, 0, FALSE);
  25.         Add('Notes', ftMemo, 50, FALSE);
  26.         Add('Graphic', ftGraphic, 0, FALSE);
  27.       end;
  28.       with IndexDefs do
  29.       begin
  30.         Clear;
  31.         Add('', 'Species No', [ ixPrimary,ixUnique]);
  32.       end;
  33.       CreateTable
  34.     finally
  35.       Free
  36.     end
  37.   end {CreateBIOLIFE};
  38.  
  39. end.
  40.